package com.cloud.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Accessors(chain = true)
@TableName(value = "sys_visit_log")
public class SysLog {

    @TableId
    @ApiModelProperty(value = "编号")
    private Integer id;

    //    @NotNull(message = "reqUser can't be null", groups = {Query.class})
    @ApiModelProperty(value = "请求发起人用户名")
    private String reqUser;

    @ApiModelProperty(value = "请求发起人账号id")
    private String reqAccountId;

    @ApiModelProperty(value = "请求头")
    private String reqHeader;

    @ApiModelProperty(value = "请求参数")
    private String reqParam;

    @ApiModelProperty(value = "请求时间")
    private Date reqTime;

    @ApiModelProperty(value = "响应状态码")
    private Integer respCode;

    @ApiModelProperty(value = "响应头")
    private String respHeader;

    @ApiModelProperty(value = "响应数据")
    private String respBody;

    @ApiModelProperty(value = "响应时间")
    private Date respTime;

    @ApiModelProperty(value = "请求处理时间")
    private Long processTime;

    //    @NotNull(message = "reqUser can't be null", groups = {Query.class})
    @ApiModelProperty(value = "请求地址")
    private String reqAddr;

    @ApiModelProperty(value = "请求来源ip地址")
    private String reqHost;

    //    @Transient
    @ApiModelProperty(value = "skywalking的traceId")
    private String skyTraceId;

    //    @Transient
    @ApiModelProperty(value = "微服务应用名-调用方")
    private String sourceApplicationName;

    @ApiModelProperty(value = "微服务应用名-被调用方")
    private String applicationName;

    @ApiModelProperty(value = "请求方法")
    private String reqMethod;

    @ApiModelProperty(value = "账号类型 ")
    private String acctType;

    @ApiModelProperty(value = "调用链id")
    private String traceId;

    @ApiModelProperty(value = "当前请求id")
    private String spanId;

    @ApiModelProperty(value = "上一级的id")
    private String parentId;

    @ApiModelProperty(value = "微服务实例服务器ip")
    private String instance;

    @ApiModelProperty(value = "请求转发开发时间")
    private Date callStart;

    @ApiModelProperty(value = "请求转发结束时间")
    private Date callEnd;

    @ApiModelProperty(value = "请求转发持续时间")
    private Long callTime;

    @ApiModelProperty(value = "删除标志")
    private Integer delFlag = 0;
    @ApiModelProperty(value = "创建时间")
    private Date crtTime;
    @ApiModelProperty(value = "修改时间")
    private Date updTime;
}